home *** CD-ROM | disk | FTP | other *** search
/ 501 Great Games / 501 Great Games - Volume One (2001)(Guildhall Leisure Services).iso / SPELLING TEST / VIEWICON.FRM (.txt) < prev   
Visual Basic Form  |  1991-09-15  |  18KB  |  379 lines

  1. Viewer
  2. Spelling Word Viewer
  3. Courier
  4. wwwwp
  5. Form1*
  6. IconWrks Viewer
  7.     FormTitle
  8. Select Spelling File
  9. Pic_VerticalLine
  10. System
  11. Spell_Words
  12. Spelling Words
  13. SpellWordList
  14. Pic_HorizontalLine
  15. Txt_FileName
  16. Lbl_File
  17. Fi&le:
  18. Lbl_Directory
  19. Directory:
  20. Lbl_CurrentDirectory
  21. Lbl_Directories
  22. &Directories:
  23. Pic_IconCount
  24.     Lbl_Icons
  25. &Spelling Files
  26. Dir_DirectoryList
  27. File_FileList
  28. *.ace
  29. Lbl_Drives
  30. Dri&ves:
  31. Drv_DriveList
  32. Menu_Drill
  33. S&pell
  34. Menu_ChangeWords
  35. &Change Words
  36.         Menu_Exit
  37. E&xit
  38.     Menu_Help
  39. &Help
  40. Menu_HelpSelection
  41. &Index
  42. Menu_HelpSelection
  43.     &Keyboard
  44. Menu_HelpSelection
  45.     &Commands
  46. Menu_HelpSelection
  47. &Using Help
  48. Menu_HelpSelection
  49. Menu_HelpSelection
  50.     &About...
  51. Badicon
  52. @    Form_Load
  53. Pic_IconsBitmap
  54. Pic_SelectediconB
  55.     BackColor
  56. WHITE
  57. ViewerLoaded
  58. Menu_OptionsSelection
  59. MID_SHOW_ON_DIR_CHANGE
  60. Checkedn
  61. GetPrivateProfileInt
  62. APP_NAME4
  63. KEY_SHOW_ICONSu
  64. INI_FILENAME
  65. ScreenQ
  66. Widthd
  67. HeightA
  68. MinViewerWidth
  69. Pic_VerticalLine
  70. Scrl_AllIcons
  71.     ICON_CELLX
  72. ScaleWidth
  73. MinViewerHeight
  74. ScaleHeightL
  75. MID_SHOW_ALL_ICONSQ
  76. Enabled
  77. File_FileList 
  78.     ListCount
  79.     Lbl_Icons
  80. Caption
  81. Lbl_CurrentDirectoryy
  82. Dir_DirectoryList
  83. Txt_FileName
  84. TextD
  85. Pattern
  86. VLastChanged4
  87. DIR_CHANGEDM
  88. Menu_FileSelectionc
  89. MID_EXIT
  90. A_TAB8
  91. Menu_OptionsSelection_Click
  92. Form_Resize
  93. WindowState
  94.     MINIMIZED~
  95. NewWidthq
  96.     NewHeight
  97. Adjust_All_ControlsB
  98. ValueG
  99. MaxIcons
  100. ShowingAllIcons
  101. IconColumns
  102. LargeChange6
  103. IconRows
  104. Visible
  105. Update_Displayed_Icons;
  106. Pic_AllIconsZ
  107. NumIconRows
  108.     FirstIcon
  109. PixelWidth1
  110. BitBlt
  111. SRCCOPY
  112. Load_All_Icons[
  113. FALSEj
  114. AutoRedraw
  115.     ForeColor
  116. Pic_IconCount
  117. MousePointer
  118.     HOURGLASS
  119. CurrentX
  120. Valid_Icon}
  121.     BLACKNESS$
  122. DEFAULTq
  123. WINDOW_TEXT1
  124. WINDOW_BACKGROUND4
  125. Dir_DirectoryList_Change
  126. UpDate_FileSpec
  127. ViewerG
  128. Menu_EditCopy_Click
  129.     Clipboard
  130. image}
  131. Pic_AllIcons_Paint<
  132. Pic_AllIcons_MouseDownl    
  133. Button
  134. Shift
  135. LEFT_BUTTON
  136. XIcon_
  137. YIcon
  138. SelectedIconl
  139.     ListIndex
  140. DragIcon
  141. Scrl_AllIcons_Change
  142. Pic_SelectedIcon_MouseDown
  143. File_FileList_Click
  144. FileName
  145. Menu_EditCopyK
  146. FILE_CHANGED
  147. File_FileList_PathChange
  148. Picture
  149. File_FileList_DblClick
  150. Open_Selected_Icon
  151. File_FileList_KeyPress
  152. KeyAscii
  153. Txt_FileName_KeyPressc    
  154. AllIconsVisiblez
  155. NewAllIconsWidthy    
  156. Drv_DriveList
  157. Lbl_Drives
  158. Menu_HelpSelection_Click
  159. Indexw
  160.     MID_ABOUT
  161. MID_KEYBOARDD
  162. MID_COMMANDS
  163. Get_Help[    
  164. AboutBoxF    
  165. MODAL'
  166. MID_EDITOR
  167. Editor
  168. MODELESS
  169. Dir_DirectoryList_Click
  170. Txt_FileName_Change
  171. FILENAME_CHANGED
  172. Dir_DirectoryList_KeyPress
  173. OldPatternx
  174.     ValidName
  175. Validate_FileSpec
  176. drive7    
  177. Load_An_Icona
  178. Drv_DriveList_Change
  179. Validate_And_Change_Drives$    @
  180. Menu_FileSelection_Click
  181. MID_OPENG
  182. Menu_File_Click
  183. Form_UnloadP    
  184. Cancel
  185. WinHelp
  186. hwndY
  187. dummy=
  188.     HELP_QUIT%
  189. WritePrivateProfileString1
  190. MainForm
  191. ICONWORKS_VIEWER
  192. EditorLoadedL
  193. MBYES
  194. ICONWORKS_EDITOR0
  195. Pic_SelectedIconLabel_Paint
  196. Pic_SelectedIconLabele
  197. CurrentY
  198. Prompt
  199. Open_Selected_File
  200. Menu_ChangeWords_Click
  201. Open_Selected_Spell
  202. Pic_IconsBitmap_Click
  203. Lbl_Directory_Click
  204. Lbl_File_Click]
  205. Pic_IconCount_Click
  206. Lbl_Directories_Clickw
  207. Lbl_Icons_Click
  208. SpellWordList_Change
  209. Label1_Click
  210. FileNum
  211.     OpenError
  212. SpellWordList
  213. Pic_VerticalLine_Click
  214. Load_All_Words
  215. NextLine
  216. LineFromFile
  217. Spell_Words
  218. Update_Displayed_Words
  219. SpellWords
  220. Menu_Options_Click
  221. Pic_HorizontalLine_Click
  222. MgBox8
  223. Menu_Exit_Click
  224. Menu_Drill_Click
  225.     Menu_Exit
  226. NumWords
  227. Spelling_Drill
  228. Lbl_CurrentDirectory_Click&
  229. Form_Load
  230.  Inform rest of Iconworks that the Viewer is loaded.  Viewer.Visible could
  231.  be tested but accessing the visible property would cause the Viewer to be
  232.  loaded if not already loaded.
  233. Menu_OptionsSelection(MID_SHOW_ON_DIR_CHANGE).Checked = -GetPrivateProfileInt(APP_NAME, KEY_SHOW_ICONS, 0, INI_FILENAME)
  234.  Center Viewer
  235.  Calculate the Minimum width and Height for the Viewer.  This is done, sor
  236.  the smallest window allowed will still allow easy access to all controls.
  237.  Enable the "Show all icons' menu option only if the current directory
  238.  contains iconso
  239. Menu_OptionsSelection(MID_SHOW_ALL_ICONS).Enabled = File_FileList.ListCount > 0P
  240.  Display the number of icons in the current directory, display the
  241.  current directory, and set the current file name to the default
  242.  file spec of "*.ACE", which was set at design time into the File 
  243.  ListBox.c
  244.  &Spelling Files
  245.  The Alt+F4 accelerator for Exit, cannot be assigned using the Menu
  246.  design Window, so we need to put the accelerator into the caption.
  247.  Alt+F4 is actually the System menus Close option.
  248. Menu_Exit.Caption = "E&xit" + A_TAB + "Alt+F4"
  249. If Menu_OptionsSelection(MID_SHOW_ON_DIR_CHANGE).Checked And (File_FileList.ListCount <> 0) Then Menu_OptionsSelection_Click MID_SHOW_ALL_ICONSI
  250. Form_Resize
  251.  The Form has been resized, so we need to resize and possible reposition
  252.  some of the controls on the form, however, we do not want to do anything
  253.  if the form is minimized.
  254.  Check if new size is less than the minimum Viewer size.
  255.  The form is smaller than the minimum size, either in width or
  256.  height, so reset the width and/or height to the minimum values.
  257.  The form is greater than the minimum width and height valuese
  258.  so adjust any controls that need resizing or repositioning.
  259. SpellWordList.Value = 0i
  260.  There are more icons that can be displayed at once within
  261.  the current new size of the Form, so we need to calculate
  262.  new Max and LargeChange values for the scrollbar.
  263. SpellWordList.Max = Diff \ IconColumns
  264. If (Diff Mod IconColumns) Then SpellWordList.Max = SpellWordList.Max + 1
  265. SpellWordList.LargeChange = IconRows
  266. SpellWordList.Visible = TRUE' And (File_FileList.ListCount > MaxIcons)
  267. Dir_DirectoryList_Change
  268.  A new directory has been selected, so Set current directory
  269.  to the newly selected directory
  270.  Display the newly selected directoryo
  271.  Inform the File ListBox of the PathChange.c
  272.  Display new filespec in FileName TextBoxe
  273. Pic_AllIcons_Paint
  274.  A portion of the viewing area needs to be updated, so if we
  275.  are currently displaying any icons, Update the viewing area.
  276. File_FileList_Click
  277.  When a file is selected from the File Listbox with single click
  278.  from the mouse, this routine displays the selected file just abovea
  279.  the file listbox if it is a valid word file.o
  280. File_FileList_PathChange
  281.  There are no words in the current directory
  282. Spelling Words
  283.  Display the number of icons in the current directoryu
  284.  &Spelling Files
  285. File_FileList_DblClick
  286.  Double Clicking a file within the File ListBox signals that ane
  287.  existing file has been selected, so attempt to open the file.
  288. File_FileList_KeyPress
  289.  Pressing Enter when the File ListBox has the Focus should react
  290.  just as if the File ListBox was Double Clicked, so all we needt
  291.  to do is attempt to open the selected file.
  292. Txt_FileName_KeyPress
  293.  Enter was pressed, so cancel the KeyStroke to prevent a Beep,
  294.  and attempt to open the selected file as an Icon.
  295. Adjust_All_Controls
  296.  Save the visibility state of the Icon viewing window, since
  297.  we resize it whether it is visible or not.i
  298.  Hide all controls that can be resized, while the actual resizing is
  299.  being done.  This prevents uneccessary screen updates.l
  300.  Resize and Repostion affected controlsb
  301. SpellWordList.Move SpellWordList.Left, SpellWordList.Top, NewAllIconsWidth, ScaleHeight0
  302. SpellWordList.Height = ScaleHeight + 2
  303.  Redisplay controls hidden before resizing and reposition was done
  304. Menu_HelpSelection_Click
  305.  Determine what help topic to display.  The *Index* and *Using Help*
  306.  items are the same for both the Viewer and the Editor, but theH
  307.  items: Keyboard and Commands are different and have
  308.  different Help topic ID's, so we add 3 to the Menu item which
  309.  will then make the Index correspond to the correct Help topic.
  310.  Display the IconWorks About box
  311. Dir_DirectoryList_Click
  312.  The actual directory has not changed since the Directory ListBox was
  313.  only single clicked , so all we need to do is display the new filea
  314.  spec for the selected directory in the FileName TextBox.e
  315. Txt_FileName_Change
  316. Dir_DirectoryList_KeyPress
  317.  Pressing Enter when the Directory ListBox has the Focus shouldf
  318.  react just as if the Directory ListBox was double clicked, so all we
  319.  need to do is set the Path property of the Directory control to the
  320.  selected directory.
  321. Drv_DriveList_Change
  322.  Selecting a drive from a Drive control does not generate an error
  323.  if the selected drive is not ready, so we verify that the drive is
  324.  in fact ready before we accept the drive.
  325. Menu_FileSelection_Click
  326.  One of the 2 File menu items were selected, so determine which one
  327.  and perform the corresponding task.
  328. Menu_File_Click
  329.  Before displaying the file menu, enable or disable the File.Openn
  330.  command, based on whether or not an Icon is currently selected.
  331. Menu_FileSelection(MID_OPEN).Enabled = File_FileList.ListIndex >= 0 
  332. Form_Unload
  333.  Let the rest of IconWorks know that the Viewer is no longer loaded.
  334. R = WritePrivateProfileString(APP_NAME, KEY_SHOW_ICONS, Format$(Abs(Menu_OptionsSelection(MID_SHOW_ON_DIR_CHANGE).Checked)), INI_FILENAME)
  335.  If the Viewer was started up first then we treat it as the main Form.
  336.  So, if the Editor is loaded, we should as the user if the Editor should
  337.  also be terminated.
  338. Open_Selected_File
  339.  The directory was the last control accessed, so we need only 
  340.  set its Path to is currently selected item, which will generate
  341.  a Change event for the Directory control, which will take caree
  342.  of updating the other related controlso
  343.  The FileName TextBox or the File ListBox was last accessed.
  344.  Validate the filename only if the FileName TextBox was the last
  345.  control accessed.  We do not need to Validate the Filename if the
  346.  File ListBox was last accessed since if the FileName is listed,
  347.  then the File exists.
  348.  The FileName entered into the FileName TextBox many have contained
  349.  a new drive and path, so in case it did, we need to inform thei
  350.  Drive and Directory controls of this change.n
  351.  Set Err to no Error (FALSE) and attempt to load the selected file
  352.  File open error
  353. The error message for error number "
  354. Sorry your spelling word file is too large
  355. File too Big
  356. Load_All_Words
  357.  When a request is made to display all the words in the current directory
  358.  this routine is called to perform the task.
  359.  Refresh the File listbox to pick up any files that might have beene
  360.  added to the current directory since this directory was selected.
  361.  Determine if the scrollbar is needed.  If there are more icons in the
  362.  current directory than can be displayed at once, the scrollbar must
  363.  be active to allow viewing of all the icons.n
  364.  Display the Icon Viewing window
  365. 0 Spelling Words
  366. Line Input #FileNum, NextLine$
  367. as each line is read, add it to those preceddingit, then
  368. replace the terminator (lineinput drops them))
  369.  Spelling Words"
  370.  Spelling Words"
  371. Update_Displayed_Words
  372.  When the form is resized, the scrollbar is scrolled, or anything causing the.
  373.  currently displayed icons to be updated, this routine is called to displayh
  374.  or redisplay the viewing window.n
  375. Menu_Exit_Click
  376. Menu_ChangeWords_Click
  377. notepad.exe 
  378. Menu_Drill_Click
  379.